package com.qf.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.Map;
import java.util.Set;

/**
 * @author 千锋教育
 * @Company http://www.mobiletrain.org/
 * @Version 1.0
 */
@FeignClient("sms-platform-cache")
public interface CacheFeign {
    @RequestMapping(value = "/cache/hgetStr/{key}/{field}",method = RequestMethod.POST)
    public String hget(@PathVariable(value = "key") String key, @PathVariable(value = "field") String field);


    @RequestMapping(value = "/cache/get/{key}", method = RequestMethod.GET)
    public String get(@PathVariable("key") String key);

    @RequestMapping(value = "/cache/hmget/{key}", method = RequestMethod.GET)
    public Map hMGet(@PathVariable("key") String key);

    @GetMapping(value = "/cache/keys/{key}")
    public Set<String> keys(@PathVariable(value = "key")String key);
}
